
export default{

        namespaced:true,
        state:{
           token:'',
           booksList:[],
           UserList:[]
        },
        getters:{
            getToken(_state){
               return _state.token
            },
            getUserList(_state){
                return _state.UserList
            },
            getbooksList(_state){
                return _state.booksList
            }
        },
        actions:{
            tokenAct(_store,_data){
                Promise.resolve().then(()=>{
                    _store.commit('setToken',_data)
                })
            },
            booksListAct(_store,_data){
                Promise.resolve().then(()=>{
                    _store.commit('setbooksList',_data)
                })
            },
            UserListAct(_store,_data){
                Promise.resolve().then(()=>{
                    _store.commit('setUserList',_data)
                })
            }
        },
        mutations:{
            setToken(_state,_token){
                 _state.token=_token
            },
            setUserList(_state,_UserList){
                _state.UserList=_UserList
            },
            setbooksList(_state,_booksList){
                _state.booksList=_booksList
            }
        }
}